<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class LawOrder extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'law_order';

    // function user()
    // {
    //     return $this->hasOne(User::class, 'user_id', 'id');
    // }

    function categoryOne()
    {
        return $this->hasOne(Category::class, 'id', 'category_one_id');
    }

    function categoryTwo()
    {
        return $this->hasOne(Category::class, 'id', 'category_two_id');
    }
}
